clear;

% 读取 CSV 文件
filename = '.\WAVE(2023.11.25-13.02.16).csv';
data = readmatrix(filename, 'Delimiter', ',');
fid = fopen(filename, 'r');
headerLine = fgetl(fid);
fclose(fid);
%%%%%%%%%%生成非数组类型

headers = split(headerLine, ',');
% 创建 MATLAB 结构体
DataAll = struct();

% 将数据存储到结构体中
for i = 1:length(headers)
    fieldName = genvarname(headers{i});
    DataAll.(fieldName) = data(:, i);
end